﻿namespace ExamsScore
{
    public class ExamScore
    {
        public string examName { get; set; }
        private List<(String, int)> studentsList;
        public const string GetStudentNumberLessZeroMessage = "Номер меньше нуля";
        public const string GetStudentNumberExceedsLenListMessage = "Номер больше числа людей в списке";
        public const string AddStudentScoreLessZeroMessage = "Балл меньше нуля";
        public const string AddStudentScoreExceedsHungredMessage = "Балл больше ста";
        public ExamScore(String name, (String, int) t)
        {
            examName = name;
            studentsList = new List<(String, int)>();
            studentsList.Add(t);
        }

        public int getListCount() { 
            return studentsList.Count; 
        }
        public (String, int) getStudent(int number)
        {
            if (number > studentsList.Count())
            {
                throw new ArgumentOutOfRangeException("number", number, GetStudentNumberExceedsLenListMessage);
            }
            if (number < 0)
            {
                throw new ArgumentOutOfRangeException("number", number, GetStudentNumberLessZeroMessage);
            }
            return studentsList[number];
        }

        public void addStudent(String studentName, int score)
        {
            if (score > 100)
            {
                throw new ArgumentOutOfRangeException("score", score, AddStudentScoreExceedsHungredMessage);
            }
            if (score < 0)
            {
                throw new ArgumentOutOfRangeException("score", score, AddStudentScoreLessZeroMessage);
            }
            studentsList.Add((studentName, score));
        }

        public static void Main(String[] args)
        {

        }
    }
}